package net.zjitc.service.impl;

import net.zjitc.dao.AdminProductDao;
import net.zjitc.dao.impl.AdminProductDaoImpl;
import net.zjitc.pojp.Evaluate;
import net.zjitc.pojp.Product;
import net.zjitc.service.AdminProductService;
import net.zjitc.utils.PageBean;

import java.util.List;

/**
 * Created by Administrator on 2017/11/22.
 */
public class AdminProductServiceImpl  implements AdminProductService{
    AdminProductDao dao=new AdminProductDaoImpl();
    public PageBean<Product> findPageBean(int page, int pageSize) {
        return dao.findPageBean(page,pageSize);
    }

    public int insert(Product product) {
        return dao.insert(product);
    }

    public PageBean<Product> findPageBeanByCid(int page, int pageSize, int cid) {
        return dao.findPageBeanByCid(page,pageSize,cid);
    }

    public PageBean<Product> findPageBeanByCsid(int page, int pageSize, int csid) {
        return dao.findPageBeanByCsid(page,pageSize,csid);
    }

    public Product findByPid(int pid) {
        return dao.findByPid(pid);
    }

    public List<Evaluate> findEvaluateByPid(int pid) {
        return dao.findEvaluateByPid(pid);
    }
}
